package com.dlws.modules.audio.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.dlws.modules.audio.entity.AudioInfo;
import com.dlws.modules.audio.entity.AudioInfoPageVo;
import com.dlws.modules.audio.mapper.AudioInfoMapper;
import com.page.Pagination;
@Service
public class AudioInfoServiceImpl implements AudioInfoService {

	@Autowired
	private AudioInfoMapper audioInfoMapper;
	@Override
	public AudioInfo queryOne(AudioInfo record) {
		// TODO Auto-generated method stub
		return audioInfoMapper.selectOne(record);
	}

	@Override
	public List<AudioInfo> queryAll(AudioInfo record) {
		// TODO Auto-generated method stub
		return audioInfoMapper.select(record);
	}

	@Override
	public int queryCount(AudioInfo record) {
		// TODO Auto-generated method stub
		return audioInfoMapper.selectCount(record);
	}

	@Override
	public AudioInfo queryByPrimaryKey(Object key) {
		// TODO Auto-generated method stub
		return audioInfoMapper.selectByPrimaryKey(key);
	}

	@Override
	public int add(AudioInfo record) {
		// TODO Auto-generated method stub
		return audioInfoMapper.insert(record);
	}

	@Override
	public int addSelective(AudioInfo record) {
		// TODO Auto-generated method stub
		return audioInfoMapper.insertSelective(record);
	}

	@Override
	public int delete(AudioInfo record) {
		// TODO Auto-generated method stub
		return audioInfoMapper.delete(record);
	}

	@Override
	public int deleteByPrimaryKey(Object key) {
		// TODO Auto-generated method stub
		return audioInfoMapper.deleteByPrimaryKey(key);
	}

	@Override
	public int updateByPrimaryKey(AudioInfo record) {
		// TODO Auto-generated method stub
		return audioInfoMapper.updateByPrimaryKey(record);
	}

	@Override
	public int updateByPrimaryKeySelective(AudioInfo record) {
		// TODO Auto-generated method stub
		return audioInfoMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int queryCountByExample(AudioInfo example) {
		// TODO Auto-generated method stub
		return audioInfoMapper.selectCountByExample(example);
	}

	@Override
	public List<AudioInfo> queryByExample(AudioInfo example) {
		// TODO Auto-generated method stub
		return audioInfoMapper.selectByExample(example);
	}

	@Override
	public Pagination pagelist(AudioInfoPageVo audioInfo) {
		// TODO Auto-generated method stub
		Pagination pagination = new Pagination(audioInfo.getPageNo(), audioInfo.getPageSize(), pagecount(audioInfo));
		pagination.setList(audioInfoMapper.pagelist(audioInfo));
		return pagination;
	}

	@Override
	public int pagecount(AudioInfoPageVo audioInfo) {
		// TODO Auto-generated method stub
		return audioInfoMapper.pagecount(audioInfo);
	}

}
